package org.example.day;

/**
 * @Description: TODO
 * @Author wyatt
 * @Data 2024/09/05 9:39
 */
public class Solution3174 {

    public String clearDigits(String s) {
        StringBuilder sf = new StringBuilder();
        for (char c : s.toCharArray()) {
            if(Character.isDigit(c)){
                sf.deleteCharAt(sf.length() - 1);
            }else {
                sf.append(c);
            }
        }
        return sf.toString();
    }

}
